@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600&family=Poppins:wght@600;700&display=swap');

:root {
  --primary: #0f172a;
  --accent: #3b82f6;
  --accent-hover: #2563eb;
  --surface: #ffffff;
  --background: #f8fafc;
  --text-main: #1e293b;
  --text-muted: #64748b;
  --border: #e2e8f0;
  --radius: 12px;
  --shadow: 0 4px 6px -1px rgb(0 0 0 / 0.1), 0 2px 4px -2px rgb(0 0 0 / 0.1);
  --transition: all 0.2s ease;
}

body {
  font-family: 'Inter', sans-serif;
  margin: 0;
  padding: 0;
  background-color: var(--background);
  color: var(--text-main);
  line-height: 1.6;
}

header {
  background: var(--primary);
  color: white;
  padding: 4rem 1rem;
  text-align: center;
  box-shadow: var(--shadow);
}

header h1 {
  font-family: 'Poppins', sans-serif;
  font-size: 2.25rem;
  margin: 0 0 0.5rem;
}

header p {
  color: #94a3b8;
  font-size: 1.1rem;
  margin: 0;
}

.container {
  max-width: 1000px;
  margin: -2rem auto 4rem;
  padding: 2.5rem;
  background-color: var(--surface);
  box-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.1);
  border-radius: var(--radius);
  position: relative;
  z-index: 10;
}

h2 {
  font-family: 'Poppins', sans-serif;
  color: var(--primary);
  font-size: 1.75rem;
  margin-top: 0;
  margin-bottom: 1.5rem;
  padding-bottom: 0.75rem;
  border-bottom: 2px solid var(--accent);
  display: inline-block;
}

h3 {
  font-family: 'Poppins', sans-serif;
  color: var(--primary);
  font-size: 1.25rem;
  margin: 2.5rem 0 1rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

h3::before {
  content: '';
  width: 4px;
  height: 20px;
  background: var(--accent);
  border-radius: 2px;
}

p,
ol,
ul {
  margin-bottom: 1.5rem;
  color: var(--text-main);
}

li {
  margin-bottom: 0.75rem;
}

pre {
  background-color: #1e293b;
  color: #f8fafc;
  padding: 1.5rem;
  border-radius: 8px;
  overflow-x: auto;
  font-family: 'Fira Code', 'Consolas', monospace;
  font-size: 0.9rem;
  line-height: 1.7;
  margin-bottom: 2rem;
  border: 1px solid #334155;
  box-shadow: inset 0 2px 4px 0 rgba(0, 0, 0, 0.05);
}

/* Code highlighting hints */
.code-keyword {
  color: #94a3b8;
}

.code-string {
  color: #3b82f6;
}

.preview-buttons {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 1rem;
  margin: 3rem 0;
  padding: 2rem;
  background: #f1f5f9;
  border-radius: var(--radius);
}

.preview-button,
.download-button {
  background-color: var(--accent);
  color: white;
  padding: 0.75rem 1.5rem;
  border: none;
  border-radius: 8px;
  cursor: pointer;
  font-weight: 600;
  font-size: 0.95rem;
  transition: var(--transition);
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
}

.preview-button:hover,
.download-button:hover {
  background-color: var(--accent-hover);
  transform: translateY(-1px);
  box-shadow: var(--shadow);
}

.download-button {
  background-color: var(--primary);
}

.download-button:hover {
  background-color: #1e293b;
}

/* Dropdown inside buttons */
.dropdown {
  position: relative;
  display: inline-block;
}

.dropdown-content {
  display: none;
  position: absolute;
  bottom: 100%;
  left: 50%;
  transform: translateX(-50%);
  background-color: white;
  min-width: 160px;
  box-shadow: var(--shadow-lg);
  z-index: 100;
  border-radius: 8px;
  overflow: hidden;
  border: 1px solid var(--border);
  margin-bottom: 0.5rem;
}

.dropdown:hover .dropdown-content {
  display: block;
}

.dropdown-content a {
  color: var(--text-main);
  padding: 0.75rem 1rem;
  text-decoration: none;
  display: block;
  font-size: 0.9rem;
  transition: var(--transition);
}

.dropdown-content a:hover {
  background-color: #f8fafc;
  color: var(--accent);
}

/* Live Preview */
.live-preview-container {
  margin-top: 3rem;
  padding: 1.5rem;
  background-color: #f8fafc;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  display: none;
  animation: fadeIn 0.4s ease-out;
}

@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(10px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.live-preview-container h3 {
  margin-top: 0;
  border: none;
}

.live-preview-iframe {
  width: 100%;
  height: 600px;
  border: 1px solid var(--border);
  background-color: white;
  border-radius: 8px;
  margin-top: 1rem;
}

footer {
  text-align: center;
  padding: 3rem 1rem;
  background-color: var(--primary);
  color: #94a3b8;
  margin-top: 4rem;
}

footer p {
  margin: 0;
  font-size: 0.9rem;
}

.QuestionImage {
  max-width: 75%;
}

/* Mobile Optimizations */
@media (max-width: 768px) {
  .container {
    margin: 0;
    padding: 1.5rem;
    border-radius: 0;
  }

  header {
    padding: 3rem 1rem;
  }

  header h1 {
    font-size: 1.75rem;
  }

  .preview-buttons {
    padding: 1rem;
    gap: 0.75rem;
  }

  .preview-button,
  .download-button {
    width: 100%;
    justify-content: center;
  }
}

th,
td {
  padding: 10px;
  text-align: center;
  border: 2px, solid;
}

table {
  border: 2px, solid;
  margin: 1%;
  margin-left: 5%;
  border-collapse: collapse;
}